package day01;

/**
 * @Author chenyeqing
 * @Date 2021/6/24 23:44
 */
public class SingletonLazy {

    private static SingletonLazy singleton;

    private SingletonLazy() {
        System.out.println(Thread.currentThread().getName() + "ok");
    }

    public static SingletonLazy getSingleton() {
        if (singleton == null) {
            singleton = new SingletonLazy();
        }
        return singleton;
    }

}
